namespace DotNetNuke.UI.ControlPanels
{
    using DotNetNuke.Entities.Portals;
    using System;
    using System.Web;
    using System.Web.UI;

    /// -----------------------------------------------------------------------------
    /// <summary>
    /// The ControlPanel class defines a custom base class inherited by all
    /// ControlPanel controls.
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class ControlPanelBase : UserControl
    {
        private string _localResourceFile;

        public string LocalResourceFile
        {
            get
            {
                if (this._localResourceFile == "")
                {
                    return (this.TemplateSourceDirectory + "/App_LocalResources/" + this.ID);
                }
                return this._localResourceFile;
            }
            set
            {
                this._localResourceFile = value;
            }
        }

        public DotNetNuke.Entities.Portals.PortalSettings PortalSettings
        {
            get
            {
                return (DotNetNuke.Entities.Portals.PortalSettings) HttpContext.Current.Items["PortalSettings"];
            }
        }
    }
}

